const host = 'https://f.foomi.cn/unipay/' //正式
// const host = 'http://192.168.2.7:8080/unipay/'
// mid:133

export function request(config={}){
	let { url, data={}, method="GET", header={} }=config
	url = host + url
	header['content-type']="application/x-www-form-urlencoded"
	return new Promise((resolve,reject)=>{
		uni.request({
			url,
			data,
			method,
			header,
			success:res=>{ resolve(res) },
			fail:err=>{ reject(err) }
		})
	})
}